package cn.edu.cqut.test0423;

import java.io.File;
import java.io.FileNotFoundException;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
			File file = new File("test.txt");
			Scanner scanner = null;
			System.out.println(file.length());
			try {
				scanner = new Scanner(file);
				while(scanner.hasNext())
				{
					String str = scanner.nextLine();
					System.out.println(str);
				}
				
			} catch (FileNotFoundException e) {
				System.out.println(e.getMessage());;
			}
			finally {
				if(scanner!=null)
					scanner.close();
			}
	}
}
